<template>
	<view class="template-mine tn-safe-area-inset-bottom">
		<!-- 顶部自定义导航 -->
		<!-- <tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="none">
      <view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left" @click="tn('/minePages/set')">
        <view class="custom-nav__back">
          <view class="tn-icon-install tn-color-light" style="font-size: 50rpx;">
          </view>
        </view>
      </view>
    </tn-nav-bar> -->

		<!-- 顶部渐变底色，需要的显示出来即可 -->
		<view class="mine-fixed">
		</view>

		<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
			<!-- 图标logo/头像 -->
			<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin" style="z-index: 9999 !important;">
				<view class="justify-content-item" @click="tn('/minePages/set')">
					<view class="tn-flex tn-flex-col-center tn-flex-row-left">
						<view class="logo-pic">
							<view class="logo-image"
								style="background-image:url('https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1683551116291-assets/web-upload/c4c0d31c-88ee-42c7-99ba-139ef206aaed.jpeg');width: 110rpx;height: 110rpx;background-size: cover;overflow: hidden;">
							</view>
						</view>
						<view class="tn-padding-right">
							<view class="tn-padding-right tn-padding-left-sm">
								<text class="tn-color-friend tn-text-xxl tn-text-bold">付衣衣</text>
							</view>
							<view class="tn-padding-right tn-padding-top-sm tn-padding-left-sm tn-text-ellipsis">
								<text class="tn-color-light">高级UI设计师</text>
								<text class="tn-color-indigo--disabled tn-padding-left-xs tn-icon-safe"></text>
							</view>
						</view>

					</view>
				</view>
				<view class="justify-content-item" @click="showModal">
					<view class="tn-icon-qr-code-circle" style="color: #100B594D;font-size: 60rpx;">
					</view>
				</view>
			</view>

			<!-- 没有授权，则显示这个授权按钮-->
			<!-- <view class="tn-flex tn-flex-row-between" @click="tn('/minePages/login')">
        <view class="tn-flex-1 justify-content-item tn-margin-xs tn-text-center">
          <tn-button backgroundColor="#8A5BF1 " padding="39rpx 0" width="40%" :fontSize="32" :plain="true" fontColor="#8A5BF1" shape="round" @click="tn('')">
            <text class="tn-icon-wechat-fill tn-padding-right-sm"></text>
            <text class="">授权登录</text>
          </tn-button>
        </view>
      </view> -->


			<!-- 更多信息-->
			<!-- 方式12 start-->
			<view class="tn-strip-bottom-min"></view>

			<!-- 更多信息-->
			<view class="tn-padding-top-sm tn-padding-bottom-sm tn-bg-white" style="border-radius: 10rpx;">
				<ListItem :hover="true" :unlined="true" :radius="true" :fontSize="30" padding="36rpx 30rpx" @click="copySource">
					<view class="tn-flex tn-flex-col-center">
						<view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #4CBCF2;">
							<view class="tn-icon-bookmark"></view>
						</view>
						<view class="tn-margin-left-sm tn-flex-1 tn-text-lg tn-color-friend">开源地址</view>
						<view class="tn-color-light tn-icon-right"></view>
					</view>
				</ListItem>
				<ListItem :hover="true" :unlined="true" :radius="true" :fontSize="30" padding="36rpx 30rpx"
					@click="tn('/minePages/public')">
					<view class="tn-flex tn-flex-col-center">
						<view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #00C8B0;">
							<view class="tn-icon-praise-simple"></view>
						</view>
						<view class="tn-margin-left-sm tn-flex-1 tn-text-lg tn-color-friend">关注我们</view>
						<view class="tn-color-light tn-icon-right"></view>
					</view>
				</ListItem>
				<ListItem  :hover="true" :unlined="true" :radius="true" :fontSize="30" padding="36rpx 30rpx" @click="tn('/minePages/help')">
          <view class="tn-flex tn-flex-col-center">
            <view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #00D05E;">
              <view class="tn-icon-help"></view>
            </view>
            <view class="tn-margin-left-sm tn-flex-1 tn-text-lg tn-color-friend">帮助中心</view>
            <view class="tn-color-light tn-icon-right"></view>
          </view>
        </ListItem >
			</view>




		</view>


		<tn-modal v-model="show1" :custom="true">
			<view class="custom-modal-content">
				<image class="tn-padding" @tap="previewQRCodeImage"
					src='https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1693670768968-assets/web-upload/b3ab4530-4b5e-47fd-8d8d-61bd03235248.jpeg'
					mode='aspectFit' style="width: 100%;"></image>
				<view class="tn-text-center tn-padding-top-sm" @click="copyWechat">
					<text class="tn-color-friend">付衣衣 好友码： </text>
					<text class="tn-color-purple--disabled">10262008 </text>
					<text class="tn-color-purple--disabled tn-padding-left-xs tn-text-df tn-icon-copy"></text>
				</view>
				<tn-button backgroundColor="#8A5BF1 " padding="39rpx 0" margin="80rpx 0 0 0" width="100%" :fontSize="28"
					:plain="true" fontColor="#8A5BF1" shape="round" @click="tn('')">
					<text class="">保存相册</text>
				</tn-button>
			</view>
		</tn-modal>

		<view class='tn-tabbar-height'></view>

	</view>
</template>

<script>
	export default {
		name: 'Mine',
		data() {
			return {
				show1: false,
			}
		},
		methods: {
			// 跳转
			tn(e) {
				uni.navigateTo({
					url: e,
				});
			},

			// 跳转到图鸟UI
			navTuniaoUI() {
				uni.navigateToMiniProgram({
					appId: 'wxf3d81a452b88ff4b'
				})
			},

			//拨打固定电话
			callPhoneNumber() {
				uni.makePhoneCall({
					phoneNumber: "18219128888",
				});
			},

			// 复制id
			copyWechat() {
				wx.vibrateShort();
				uni.setClipboardData({
					data: "10262008",
				})
			},

			// 预览小程序好友码
			previewQRCodeImage() {
				wx.previewImage({
					urls: [
						'https://cdn.nlark.com/yuque/0/2023/jpeg/280373/1693670768968-assets/web-upload/b3ab4530-4b5e-47fd-8d8d-61bd03235248.jpeg'
					]
				})
			},

			// 弹出模态框
			showModal(event) {
				this.openModal()
			},
			// 打开模态框
			openModal() {
				this.show1 = true
			},

			// 复制开源地址
			copySource() {
				wx.vibrateShort();
				uni.setClipboardData({
					data: "https://ext.dcloud.net.cn/publisher?id=356088",
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.template-mine {
		max-height: 100vh;
	}

	/* 自定义颜色 */
	.tn-color-friend {
		color: #100B59;
	}

	.tn-color-light--dark {
		color: #57548A;
	}

	.tn-color-light {
		color: #A6A9CB;
	}

	.tn-color-purple-new {
		color: #957BFE;
	}

	/* 底部安全边距 start*/
	.tn-tabbar-height {
		min-height: 120rpx;
		height: calc(140rpx + env(safe-area-inset-bottom) / 2);
		height: calc(140rpx + constant(safe-area-inset-bottom));
	}

	/* 间隔线 start*/
	.tn-strip-bottom {
		width: 100%;
		border-bottom: 20rpx solid #F8F7F8;
	}

	/* 间隔线 start*/
	.tn-strip-bottom-min {
		width: 100%;
		border-bottom: 1rpx solid #F8F7F8;
	}

	/* 自定义导航栏内容 start */
	.custom-nav {
		height: 100%;

		&__back {
			margin: auto 5rpx;
			font-size: 40rpx;
			margin-right: 10rpx;
			flex-basis: 5%;
			width: 100rpx;
			position: absolute;
		}
	}

	/* 自定义导航栏内容 end */

	.mine-fixed {
		position: fixed;
		// background-color: rgba(255,255,255,1);
		// box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
		// background: linear-gradient(90deg, #bca1fe, #e5e3fe);
		background: linear-gradient(90deg, #99E3FE, #DBF2FE);
		top: 0;
		width: 100%;
		height: 450rpx;
		transition: all 0.25s ease-out;
		z-index: -1;
	}

	.mine-fixed:before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		z-index: -1;
		mask-image: linear-gradient(to bottom, transparent, black);
		background: linear-gradient(90deg, #FFFFFF, #FFFFFF);

	}

	/* 用户头像 start */
	.logo-image {
		width: 110rpx;
		height: 110rpx;
		position: relative;
		overflow: hidden;
		border-radius: 50%;
	}

	.logo-pic {
		background-size: cover;
		background-repeat: no-repeat;
		// background-attachment:fixed;
		background-position: top;
		border: 8rpx solid rgba(255, 255, 255, 0.05);
		box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.1);
		border-radius: 50%;
		overflow: hidden;
		// background-color: #FFFFFF;
	}

	/* 图标容器12 start */
	.icon12 {
		&__item {
			width: 30%;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 20rpx 10rpx;
			transform: scale(1);
			transition: transform 0.3s linear;
			transform-origin: center center;

			&--icon {
				width: 15rpx;
				height: 15rpx;
				font-size: 66rpx;
				border-radius: 50%;
				margin-bottom: 38rpx;
				position: relative;
				z-index: 1;

				&::after {
					content: " ";
					position: absolute;
					z-index: -1;
					width: 100%;
					height: 100%;
					left: 0;
					bottom: 0;
					border-radius: inherit;
					opacity: 1;
					transform: scale(1, 1);
					background-size: 100% 100%;
					// background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg.png);
				}
			}
		}
	}

	/* 图标容器1 start */
	.icon1 {
		&__item {
			// width: 30%;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			padding: 30rpx;
			margin: 20rpx 10rpx;
			transform: scale(1);
			transition: transform 0.3s linear;
			transform-origin: center center;

			&--icon {
				width: 50rpx;
				height: 50rpx;
				font-size: 50rpx;
				border-radius: 50%;
				position: relative;
				z-index: 1;

				&::after {
					content: " ";
					position: absolute;
					z-index: -1;
					width: 100%;
					height: 100%;
					left: 0;
					bottom: 0;
					border-radius: inherit;
					opacity: 1;
					transform: scale(1, 1);
					background-size: 100% 100%;
					// background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg.png);
				}
			}
		}
	}

	/* 图标容器1 end */
</style>